package com.thghh.graph;

/**
 * 边
 *
 * @author pengzhikang
 * @date 2024/8/19 15:28
 * @since 1.0.0
 */
public class Edge {

    /** 指向下一个顶点的名字 */
    private String name;
    /** 权重 */
    private int weight;
    /** 被指向的下一个边 */
    private Edge next;

    public Edge(String name, int weight) {
        this.name = name;
        this.weight = weight;
    }

    public Edge(String name, int weight, Edge next) {
        this.name = name;
        this.weight = weight;
        this.next = next;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public Edge getNext() {
        return next;
    }

    public void setNext(Edge next) {
        this.next = next;
    }
}
